package com.topgay.domain;

import java.io.Serializable;

public class ComBoard implements Serializable{
	private int no;            //-글번호
	private String id;    //아이디
	private String title;      //- 글제목
	private String nickname;     //- 작성자
	private String content;    //- 글내용
	private String writedate;   //- 작성일시 
	private int viewcount;     //- 조회수
	private int refamily;     //- 원본글을 기준으로 그 답변글들을 묶는 값
	private int restep;       //- refamily가 같은 글들간의 정렬 순서를 정의하는 값
	private int relevel;     //- 답변 레벨 (원본 : 0 이후는 +1씩)	

	
	public ComBoard(){}


	public ComBoard(int no, String id, String title, String nickname,
			String content, String writedate, int viewcount, int refamily,
			int restep, int relevel) {
		super();
		this.no = no;
		this.id = id;
		this.title = title;
		this.nickname = nickname;
		this.content = content;
		this.writedate = writedate;
		this.viewcount = viewcount;
		this.refamily = refamily;
		this.restep = restep;
		this.relevel = relevel;
	}


	public int getNo() {
		return no;
	}


	public void setNo(int no) {
		this.no = no;
	}


	public String getId() {
		return id;
	}


	public void setId(String id) {
		this.id = id;
	}


	public String getTitle() {
		return title;
	}


	public void setTitle(String title) {
		this.title = title;
	}


	public String getNickname() {
		return nickname;
	}


	public void setNickname(String nickname) {
		this.nickname = nickname;
	}


	public String getContent() {
		return content;
	}


	public void setContent(String content) {
		this.content = content;
	}


	public String getWritedate() {
		return writedate;
	}


	public void setWritedate(String writedate) {
		this.writedate = writedate;
	}


	public int getViewcount() {
		return viewcount;
	}


	public void setViewcount(int viewcount) {
		this.viewcount = viewcount;
	}


	public int getRefamily() {
		return refamily;
	}


	public void setRefamily(int refamily) {
		this.refamily = refamily;
	}


	public int getRestep() {
		return restep;
	}


	public void setRestep(int restep) {
		this.restep = restep;
	}


	public int getRelevel() {
		return relevel;
	}


	public void setRelevel(int relevel) {
		this.relevel = relevel;
	}


	@Override
	public String toString() {
		return "ComBoard [no=" + no + ", id=" + id + ", title=" + title
				+ ", nickname=" + nickname + ", content=" + content
				+ ", writedate=" + writedate + ", viewcount=" + viewcount
				+ ", refamily=" + refamily + ", restep=" + restep
				+ ", relevel=" + relevel + "]";
	}


	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((content == null) ? 0 : content.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result
				+ ((nickname == null) ? 0 : nickname.hashCode());
		result = prime * result + no;
		result = prime * result + refamily;
		result = prime * result + relevel;
		result = prime * result + restep;
		result = prime * result + ((title == null) ? 0 : title.hashCode());
		result = prime * result + viewcount;
		result = prime * result
				+ ((writedate == null) ? 0 : writedate.hashCode());
		return result;
	}


	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ComBoard other = (ComBoard) obj;
		if (content == null) {
			if (other.content != null)
				return false;
		} else if (!content.equals(other.content))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (nickname == null) {
			if (other.nickname != null)
				return false;
		} else if (!nickname.equals(other.nickname))
			return false;
		if (no != other.no)
			return false;
		if (refamily != other.refamily)
			return false;
		if (relevel != other.relevel)
			return false;
		if (restep != other.restep)
			return false;
		if (title == null) {
			if (other.title != null)
				return false;
		} else if (!title.equals(other.title))
			return false;
		if (viewcount != other.viewcount)
			return false;
		if (writedate == null) {
			if (other.writedate != null)
				return false;
		} else if (!writedate.equals(other.writedate))
			return false;
		return true;
	}

	
}
